package com.ruoyi.xh.service.impl;

import java.util.stream.Collectors;
import java.util.stream.Stream;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.springframework.transaction.annotation.Transactional;
import com.ruoyi.xh.mapper.XhSeriesMapper;
import com.ruoyi.xh.domain.XhSeries;
import com.ruoyi.xh.service.IXhSeriesService;

/**
 * 商城设置Service业务层处理
 * 
 * @author songjw
 * @date 2024-12-13
 */
@Service
public class XhSeriesServiceImpl extends ServiceImpl<XhSeriesMapper,XhSeries> implements IXhSeriesService {

    /**
     * 查询商城设置
     * 
     * @param id 商城设置主键
     * @return 商城设置
     */
    @Override
    public XhSeries selectXhSeriesById(Long id)
    {
        return this.getById(id);
    }

    /**
     * 查询商城设置列表
     * 
     * @param xhSeries 商城设置
     * @return 商城设置
     */
    @Override
    public Page<XhSeries> selectXhSeriesList(XhSeries xhSeries)
    {
        return new Page<>();
    }

    /**
     * 新增商城设置
     * 
     * @param xhSeries 商城设置
     *
     */
    @Override
    public void insertXhSeries(XhSeries xhSeries)
    {
        this.save(xhSeries);
    }

    /**
     * 修改商城设置
     * 
     * @param xhSeries 商城设置
     *
     */
    @Override
    public void updateXhSeries(XhSeries xhSeries)
    {
        this.updateById(xhSeries);
    }

    /**
     * 批量删除商城设置
     * 
     * @param ids 需要删除的商城设置主键
     *
     */
    @Override
    @Transactional(rollbackFor = Exception.class)
    public void deleteXhSeriesByIds(Long[] ids)
    {
        this.removeByIds(Stream.of(ids).collect(Collectors.toSet()));
    }
}
